package com.cn.mapper.dao.db5.PartsManagement;

import com.cn.bean.vo.PartsManagement.ComponentItemClassification;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ComponentItemClassificationDao {
    List<ComponentItemClassification> selectComponentItemClassificationAside();

    List<ComponentItemClassification> selectComponentItemClassification(@Param("limit") int limit, @Param("page") int page, @Param("cCode") String cCode, @Param("cName") String cName);

    List<ComponentItemClassification> selectComponentItemClassificationText(@Param("cCode") String cCode, @Param("cName") String cName);

    //添加分类
    int addComponentItemClassificationAside(@Param("mId") int mId, @Param("mCode") String mCode, @Param("mName") String mName, @Param("mDescription") String mDescription, @Param("mStatus") int mStatus, @Param("parentId") int parentId, @Param("level") int level, @Param("isLeaf") int isLeaf);

    //添加信息
    int addComponentItemBasicInfoTable(@Param("cId") int cId, @Param("cCode") String cCode, @Param("cName") String cName, @Param("cDescription") String cDescription, @Param("cStatus") int cStatus, @Param("classificationId") int classificationId);

    List<ComponentItemClassification> selectAside();

    List<ComponentItemClassification> selectChild();

    List<ComponentItemClassification> selectChildID(@Param("ID") int ID);

    //查询状态为1的零件信息表
    List<ComponentItemClassification> selectChildAuto1(@Param("cName") String cName);

    int deleteAside(@Param("mId") int mId);

    int deleteComponentItemBasicInfo(@Param("cId") int cId);

    int updateAside(@Param("mId") int mId, @Param("mName") String mName, @Param("mDescription") String mDescription, @Param("mStatus") int mStatus, @Param("parentId") int parentId, @Param("level") int level);

    int updateComponentItemBasicInfo(@Param("cId") int cId, @Param("cName") String cName, @Param("cDescription") String cDescription, @Param("cStatus") int cStatus, @Param("classificationId") int classificationId);

}
